package com.atguigu.cloud.common.https.enums;

import lombok.Getter;

/**
 * 响应状态码枚举
 */
@Getter
public enum CodeMsgEnum {
    SUCCESS(200, "成功"),
    PARAM_ERROR(400, "参数错误"),
    AUTH_ERROR(401, "认证失败"),
    FORBIDDEN(403, "权限不足"),
    PAGE_ERROR(404, "页面不存在"),
    METHOD_NOT_ALLOWED(405, "请求方法不允许"),
    CONFIG_ERROR(460, "配置错误"),
    SERVICE_ERROR(500, "服务器内部异常"),
    SERVICE_UNAVAILABLE(503, "服务不可用");

    private final int code;
    private final String msg;

    CodeMsgEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
